package io.test.bio;

import java.io.OutputStream;
import java.net.Socket;
import java.util.UUID;

/**
 * @author chedx
 * @data 2021/4/8 10:42 PM
 */
public class BIOClientCP {
    public static void main(String[] args) throws  Exception{
        Socket client = new Socket("localhost", 8080);

        OutputStream os = client.getOutputStream();
        String name = UUID.randomUUID().toString();
        System.out.println("像客户端发送数据"+ name);
        os.write(name.getBytes());
        os.close();
        client.close();
    }
}
